<?php

namespace Home\Controller;

use Common\Service\ChuanglanSmsTpl;
use Think\Log;

/**
 * 店长
 * Class StoremanagerController
 * @package Home\Controller
 */
class StoremanagerController extends BaseController
{
    public function __construct()
    {
    }

    /**
     * 最新活动
     * 搜索 keyword
     */
    public function activityList()
    {
        $uid = I('id');//这里的id既是门店的id也是店长用户id
        $size = I('size', 5);
        $page = I('page', 1);
        $keyword = I('keyword');

        $user = $this->checkUser('store', $uid);
        if (!$user) {
            $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '用户信息有误', 'data' => []]);
        }

        if ($keyword) {
            $where['name'] = ['like', '%' . $keyword . '%'];
        }

        //FIND_IN_SET使用
        $where['_string'] = 'FIND_IN_SET(' . "'$uid'" . ',store_ids)';
        $where['status'] = 1;
        $data = $this->getList('activity', $where, $size, $page);

        if ($page == 1 && !$data) {
            $this->ajaxReturn(['status' => true, 'code' => 1000, 'msg' => '当前无活动数据', 'data' => []]);
        }

        if ($page > 1 && !$data) {
            $this->ajaxReturn(['status' => false, 'code' => 1003, 'msg' => '无更多数据', 'data' => []]);
        }

        foreach ($data as $k => $v) {
            //查询订单no
            $order = M('order')->where(['store_id' => $uid, 'activity_id' => $v['id']])->find();
            $data[$k]['uid'] = $uid;
            $data[$k]['store_id'] = $uid;
            $data[$k]['order_no'] = $order['order_no'];
            $data[$k]['store_num'] = count(explode(',', $v['store_ids']));
            $data[$k]['store_placed_num'] = 0;
            $data[$k]['status'] = $order['order_status'];
            $data[$k]['status_msg'] = $this->statusMsg()[$order['order_status']];
        }

        $ret = [
            'status' => true,
            'code' => 1000,
            'msg' => '获取活动列表',
            'data' => $data
        ];
        $this->ajaxReturn($ret);
    }

    /**
     * 活动详情
     */
    public function activityDetail()
    {
        $activity_id = I('activity_id');
        $activity = M('activity')->where(['id' => $activity_id])->find();
        if (!$activity) {
            $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '活动id有误', 'data' => []]);
        }

        //活动效果图
        $where['id'] = ['in', $activity['img_ids']];
        $imgs = M('activity_image')->where($where)->select();
        foreach ($imgs as $k => $v) {
            $img[$k]['name'] = $v['image_name'];
            $img[$k]['url'] = $v['image_url'];
        }

        $activity['images'] = $img;
        $ret = [
            'status' => true,
            'code' => 1000,
            'msg' => '效果图列表',
            'data' => $activity
        ];
        $this->ajaxReturn($ret);
    }

    /**
     * 效果图列表
     */
    public function imgList()
    {
        $activity_id = I('activity_id');
        $activity = M('activity')->where(['id' => $activity_id])->find();
        if (!$activity) {
            $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '活动id有误', 'data' => []]);
        }

        $imgs = M('activity_image')->where(['id' => ['in', $activity['img_ids']]])->select();
        $ret = [
            'status' => true,
            'code' => 1000,
            'msg' => '效果图列表',
            'data' => $imgs
        ];
        $this->ajaxReturn($ret);
    }

    /**
     * 生成订单
     */
    public function order()
    {
        $order_no = I('order_no');
        $up_time = I('up_time','');
        $down_time = I('down_time');
        $json = I('json', '', 'strip_tags');
        $is_down = $down_time ? 1 : 0;

        Log::write('下单order_no：' . $order_no);
        Log::write('下单上画时间：' . $up_time);
        Log::write('下单下画时间：' . $down_time);
        Log::write('下单json数据：' . $json);
        if (!$order_no || !$json) {
            $this->ajaxReturn(['status' => false, 'code' => 1002, 'msg' => '参数有误', 'data' => []]);
        }

        $order = M('order')->where(['order_no' => $order_no])->find();
        if ($order) {
            $data['up_time'] = $up_time;
            $data['is_down'] = $is_down;
            $data['down_time'] = $down_time;
            $data['order_status'] = 1;//下单待审核
            $order_ads = json_decode($json, true);

            $user = $this->checkUser('store', $order['store_id']);
            $user['user_id'] = $user['id'];
            $user['user_name'] = $user['manager_name'];

            //编辑订单重新下单，更新数据(没通过与没提交生成订单，都让修改)
            if ($order['order_status'] == 2 || $order['order_status'] == 1) {
                $res4 = $this->updOrderAds($order_no, $order['id'], $order_ads);
                if (!$res4['status']) {
                    $this->ajaxReturn(['status' => false, 'code' => 1004, 'msg' => $res4['msg'], 'data' => []]);
                }
                //记录日志
                $res5 = orderLog($order_no, 1, $user, '审核不通过店长重新下单', 'save');
                if (!$res5) {
                    $this->ajaxReturn(['status' => false, 'code' => 1005, 'msg' => '下单日志记录失败', 'data' => []]);
                }

            } else {
                //检测重复下单
                if ($this->checkOrder($order_no)) {
                    $this->ajaxReturn(['status' => false, 'code' => 1005, 'msg' => '该订单已在审核中，无需再次提交', 'data' => []]);
                }

                $res1 = $this->saveOrderAds($order_no, $order['id'], $order_ads);
                if (!$res1['status']) {
                    $this->ajaxReturn(['status' => false, 'code' => 1004, 'msg' => $res1['msg'], 'data' => []]);
                }
                //记录日志
                $res3 = orderLog($order_no, 1, $user, '店长下单');
                if (!$res3) {
                    $this->ajaxReturn(['status' => false, 'code' => 1005, 'msg' => '下单日志记录失败', 'data' => []]);
                }
            }

            //更新上画下画时间
            $res2 = M('order')->where(['order_no' => $order_no])->save($data);
            if ($res2 !== false) {
                //下单成功给审核员发短信
                $result = ChuanglanSmsTpl::sendOrderSmsToAudit($order);
                $this->ajaxReturn(['status' => true, 'code' => 1000, 'msg' => '下单成功', 'data' => []]);
            } else {
                $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '服务器异常', 'data' => []]);
            }
        } else {
            $this->ajaxReturn(['status' => false, 'code' => 1003, 'msg' => '订单号不存在', 'data' => []]);
        }
    }

    /**
     * 保存订单广告
     * @param $order_no
     * @param $order_id
     * @param $data
     * @return array
     */
    public function saveOrderAds($order_no, $order_id, $data)
    {
        if (!is_array($data)) {
            return ['status' => 0, 'msg' => '订单数据错误'];
        }

        foreach ($data as $k => $v) {
            $ads = M('ads')->where(['id' => $v['ads_id']])->find();
            if ($v['ads_type'] == 1) {//系统广告
                //开启事务
                M()->startTrans();
                //订单广告表
                $order_ads = [
                    'ads_id' => $v['ads_id'],  //所属门店广告位id
                    'ads_type' => $v['ads_type'], //广告位类型 1=>系统广告位 2=>门店自定义
                    'num' => $v['num'],
                    'order_no' => $order_no,
                    'order_id' => $order_id,
                    'ads_name' => $ads['ad_name'],
                    'height' => $ads['height'],
                    'width' => $ads['width'],
                    'filepath' => $ads['filepath'], //如果有最终效果图，传值
                    'is_upper_air' => $ads['is_upper_air'], //是否高空
                    'add_time' => time()
                ];

                $res1 = M('order_ads')->add($order_ads);
                //广告详情
                $order_detail = [];
                foreach ($v['ads_detail'] as $k1 => $v1) {
                    $adsDetail = M('ads_detail')->where(['id' => $v1['ads_detail_id']])->find();
                    $materiel = M('materiel')->where(['id' => $v1['materiel_id']])->find();
                    $activity = M('activity_image')->where(['id' => $v1['activity_image_id']])->find();

                    $order_detail[] = [
                        'order_no' => $order_no,
                        'order_id' => $order_id,
                        'order_ads_id' => $res1,
                        'ads_detail_id' => $adsDetail['id'],
                        'ads_name' => $adsDetail['ads_name'],
                        'ads_type' => $adsDetail['type'], //块类型，1=>长方形 2=>圆形
                        'x_axis' => $adsDetail['x_axis'], //x轴坐标
                        'y_axis' => $adsDetail['y_axis'], //y轴坐标
                        'height' => $adsDetail['height'], //高度
                        'width' => $adsDetail['width'], //宽度
                        'radius' => $adsDetail['radius'],  //半径
                        'remark' => $v1['remark'], //备注
                        'materiel_id' => $v1['materiel_id'], //材料id
                        'materiel_name' => $materiel['name'], //名称
                        'activity_image_id' => $v1['activity_image_id'], //效果图id
                        'activity_image_url' => $activity['image_url'], //地址
                        'activity_image_name' => $activity['image_name'], //地址
                        'add_time' => time()
                    ];
                }

                $res2 = M('order_ads_detail')->addAll($order_detail);
                if ($res1 && $res2) {
                    M()->commit();
                } else {
                    M()->rollback();
                    return ['status' => 0, 'msg' => '系统广告插入数据库，回滚'];
                }
            } elseif ($v['ads_type'] == 2) {//自定义广告
                //自定义广告位，只需要写入order_ads表，没有广告块
                foreach ($v['ads_detail'] as $k2 => $v2) {
                    //$activity = M('activity_image')->where(['id' => $v2['activity_image_id']])->find();
                    $materiel = M('materiel')->where(['id' => $v2['materiel_id']])->find();
                    $tmp = [
                        'order_no' => $order_no,
                        'order_id' => $order_id,
                        'ads_type' => $v['ads_type'], //广告位类型 1=>系统广告位 2=>门店自定义
                        'num' => $v['num'],
                        'ads_name' => $v2['ads_name'],
                        'remark' => $v2['remark'], //备注
                        'height' => $v2['height'],
                        'width' => $v2['width'],
                        'is_upper_air' => $v2['is_upper_air'], //是否高空
                        'materiel_id' => $v2['materiel_id'], //材料id
                        'materiel_name' => $materiel['name'], //名称
                        'activity_image_id' => $v2['activity_image_id'], //效果图id
                        //'activity_image_url' => $activity['image_url'], //地址
                        'add_time' => time(),
                        'filepath' => $v2['filepath']
                    ];

                    $res = M('order_ads')->add($tmp);
                    if (!$res) {
                        return ['status' => 0, 'msg' => '自定义广告插入数据库失败'];
                    }
                }
            } else {
                return ['status' => 0, 'msg' => '订单数据格式错误'];
            }
        }
        return ['status' => 1, 'msg' => '插入数据成功'];
    }

    /**
     * 审核不通过店长重新下单，保存订单广告
     */
    public function updOrderAds($order_no, $order_id, $data)
    {
        if (!is_array($data)) {
            return ['status' => 0, 'msg' => '订单数据错误'];
        }

        foreach ($data as $k => $v) {
            $ads = M('ads')->where(['id' => $v['ads_id']])->find();
            if ($v['ads_type'] == 1) {//系统广告
                //检测订单更新order_ads id
                if (!$this->checkUpdOrderAdsId($order_no, $v['ads_id'], $v['id'])) {
                    return ['status' => 0, 'msg' => '重新下单，更新订单广告，id有误'];
                }

                //开启事务
                M()->startTrans();
                //订单广告表
                $order_ads = [
                    'ads_id' => $v['ads_id'],  //所属门店广告位id
                    'ads_type' => $v['ads_type'], //广告位类型 1=>系统广告位 2=>门店自定义
                    'num' => $v['num'],
                    'order_no' => $order_no,
                    'order_id' => $order_id,
                    'ads_name' => $ads['ad_name'],
                    'height' => $ads['height'],
                    'width' => $ads['width'],
                    'filepath' => $ads['filepath'], //如果有最终效果图，传值
                    'is_upper_air' => $ads['is_upper_air'], //是否高空
                    'update_time' => time()
                ];

                $res1 = M('order_ads')->where(['id' => $v['id']])->save($order_ads);
                $orderAds = M('order_ads')->where(['id' => $v['id']])->find();
                //广告详情
                foreach ($v['ads_detail'] as $k1 => $v1) {
                    //检测订单更新order_ads_detail id
                    if (!$this->checkUpdOrderAdsDetailId($order_no, $v1['ads_detail_id'], $v1['id'])) {
                        return ['status' => 0, 'msg' => '重新下单，更新订单广告详情，id有误'];
                    }

                    $adsDetail = M('ads_detail')->where(['id' => $v1['ads_detail_id']])->find();
                    $materiel = M('materiel')->where(['id' => $v1['materiel_id']])->find();
                    $activity = M('activity_image')->where(['id' => $v1['activity_image_id']])->find();
                    $order_detail = [
                        'order_no' => $order_no,
                        'order_id' => $order_id,
                        'order_ads_id' => $orderAds['id'],
                        'ads_detail_id' => $adsDetail['id'],
                        'ads_name' => $adsDetail['ads_name'],
                        'ads_type' => $adsDetail['type'], //块类型，1=>长方形 2=>圆形
                        'x_axis' => $adsDetail['x_axis'], //x轴坐标
                        'y_axis' => $adsDetail['y_axis'], //y轴坐标
                        'height' => $adsDetail['height'], //高度
                        'width' => $adsDetail['width'], //宽度
                        'radius' => $adsDetail['radius'],  //半径
                        'remark' => $v1['remark'], //备注
                        'materiel_id' => $v1['materiel_id'], //材料id
                        'materiel_name' => $materiel['name'], //名称
                        'activity_image_id' => $v1['activity_image_id'], //效果图id
                        'activity_image_url' => $activity['image_url'], //地址
                        'activity_image_name' => $activity['image_name'], //地址
                        'update_time' => time(),
                    ];
                    $res2 = M('order_ads_detail')->where(['id' => $v1['id']])->save($order_detail);
                }

                if ($res1 !== false && $res2 !== false) {
                    M()->commit();
                } else {
                    M()->rollback();
                    return ['status' => 0, 'msg' => '系统广告插入数据库，回滚'];
                }
            } elseif ($v['ads_type'] == 2) {//自定义广告

                //检测订单更新order_ads id 自定义广告位的时候，默认ads_id=0
                /*if (!$this->checkUpdOrderAdsId($order_no, $v['ads_id'], $v['id'])) {
                    return ['status' => 0, 'msg' => '重新下单，更新订单广告，id有误'];
                }*/

                //自定义广告位，只需要写入order_ads表，没有广告块
                foreach ($v['ads_detail'] as $k2 => $v2) {
                    //自定义广告位没办法做id检测，因为自定义的广告位ads_id都是0
                    $materiel = M('materiel')->where(['id' => $v2['materiel_id']])->find();
                    $tmp = [
                        'order_no' => $order_no,
                        'order_id' => $order_id,
                        'ads_type' => $v['ads_type'], //广告位类型 1=>系统广告位 2=>门店自定义
                        'num' => $v['num'],
                        'ads_name' => $v2['ads_name'],
                        'remark' => $v2['remark'], //备注
                        'height' => $v2['height'],
                        'width' => $v2['width'],
                        'is_upper_air' => $v2['is_upper_air'], //是否高空
                        'materiel_id' => $v2['materiel_id'], //材料id
                        'materiel_name' => $materiel['name'], //名称
                        'activity_image_id' => $v2['activity_image_id'], //效果图id
                        'update_time' => time(),
                        'filepath' => $v2['filepath']
                    ];

                    $res = M('order_ads')->where(['id' => $v['id']])->save($tmp);
                    if (!$res) {
                        return ['status' => 0, 'msg' => '自定义广告插入数据库失败'];
                    }
                }
            } else {
                return ['status' => 0, 'msg' => '订单数据格式错误'];
            }
        }
        return ['status' => 1, 'msg' => '重新下单成功'];
    }

    /**
     * 物料列表
     */
    public function materielList()
    {
        $ret = M('materiel')->where(['status' => 1])->field('name,id')->select();
        $this->ajaxReturn(['status' => true, 'code' => 1000, 'msg' => '物料列表', 'data' => $ret]);
    }

    /**
     * 门头位图片列表
     */
    public function adImgList()
    {
        $store_id = I('store_id');
        $store = M('store')->where(['id' => $store_id])->find();
        if (!$store) {
            $this->ajaxReturn(['status' => false, 'code' => 1002, 'msg' => '门店id有误', 'data' => []]);
        }

        $where['id'] = ['in', $store['adids']];
        $ad = M('ads')->where($where)->select();
        foreach ($ad as $k => $v) {
            $tmp[$k]['ads_id'] = $v['id'];
            $tmp[$k]['ads_name'] = $v['ad_name'];
            $tmp[$k]['width'] = $v['width'];
            $tmp[$k]['height'] = $v['height'];
            $tmp[$k]['is_upper_air'] = (int)$v['is_upper_air'];
            $tmp[$k]['filepath'] = C('DOMAIN') . '/' . $v['filepath'];
            $adDetail = M('ads_detail')->where(['ads_id' => $v['id']])->select();
            foreach ($adDetail as $kk => $vv) {
                $tmp[$k]['detail'][$kk]['ads_detail_id'] = $vv['id'];
                $tmp[$k]['detail'][$kk]['ads_name'] = $vv['ads_name'];
                $tmp[$k]['detail'][$kk]['ads_type'] = $vv['type'];
                $tmp[$k]['detail'][$kk]['x_axis'] = $vv['x_axis'];
                $tmp[$k]['detail'][$kk]['y_axis'] = $vv['y_axis'];
                $tmp[$k]['detail'][$kk]['height'] = $vv['height'];
                $tmp[$k]['detail'][$kk]['width'] = $vv['width'];
                $tmp[$k]['detail'][$kk]['radius'] = $vv['radius'];
                $tmp[$k]['detail'][$kk]['remark'] = $vv['remark'];
            }
        }

        $ret = [
            'status' => true,
            'code' => 1000,
            'msg' => '广告效果图列表展示',
            'data' => $tmp
        ];
        $this->ajaxReturn($ret);
    }

    /**
     * 广告位详情列表
     */
    public function adList()
    {
        $ad_id = I('ad_id');
        $ad = M('ads')->where(['id' => $ad_id])->find();
        $adDetail = M('ads_detail')->where(['ads_id' => $ad_id])->select();
        foreach ($adDetail as $k => $v) {
            $tmp[$k]['ad_name'] = $ad['ad_name'];
            $tmp[$k]['block_name'] = $v['ads_name'];
            $tmp[$k]['type'] = $v['type'];
            $tmp[$k]['x_axis'] = $v['x_axis'];
            $tmp[$k]['y_axis'] = $v['y_axis'];
            $tmp[$k]['length'] = $v['length'];
            $tmp[$k]['width'] = $v['width'];
            $tmp[$k]['radius'] = $v['radius'];
        }

        $ret = [
            'status' => true,
            'code' => 1000,
            'msg' => '广告位详情列表',
            'data' => $tmp
        ];
        $this->ajaxReturn($ret);

    }

    /**
     * 发送验证码
     */
    public function sendCode()
    {
        $phone = I('phone');
        if (!Validator::checkPhone($phone)) {
            $this->ajaxReturn(['status' => false, 'code' => 1002, 'msg' => '请填写正确的手机号', 'data' => []]);
        }

        $res = ChuanglanSmsTpl::sendCode($phone);
        if ($res) {
            $this->ajaxReturn(['status' => true, 'code' => 1000, 'msg' => '发送验证码成功', 'data' => []]);
        } else {
            $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '发送验证码失败', 'data' => []]);
        }
    }

    /**
     * 修改手机号
     */
    public function updPhone()
    {
        $ori_phone = I('ori_phone');
        $new_phone = I('new_phone');
        $code = I('code');

        if (!Validator::checkPhone($ori_phone)) {
            $this->ajaxReturn(['status' => false, 'code' => 1002, 'msg' => '请填写正确的原始手机号', 'data' => []]);
        }
        if (!Validator::checkPhone($new_phone)) {
            $this->ajaxReturn(['status' => false, 'code' => 1003, 'msg' => '请填写正确的新手机号', 'data' => []]);
        }

        $info = M('store')->where(['mobile' => $ori_phone])->find();
        if (!$info) {
            $this->ajaxReturn(['status' => false, 'code' => 1004, 'msg' => '该手机号尚未注册', 'data' => []]);
        }

        $scode = S($new_phone);
        if ($code && $code == $scode) {
            $rs = M('store')->where(['mobile' => $ori_phone])->save(['mobile' => $new_phone, 'update_time' => time()]);
            if ($rs !== false) {
                $this->ajaxReturn(['status' => true, 'code' => 1000, 'msg' => '修改手机号成功', 'data' => []]);
            } else {
                $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '服务器异常', 'data' => []]);
            }
        } else {
            $this->ajaxReturn(['status' => false, 'code' => 1005, 'msg' => '验证码有误', 'data' => []]);
        }
    }

    /**
     * 修改密码
     */
    public function updPassword()
    {
        $ori_pwd = I('ori_pwd');
        $new_pwd = I('new_pwd');
        $conf_pwd = I('conf_pwd');
        $uid = I('id');

        if ($new_pwd != $conf_pwd) {
            $this->ajaxReturn(['status' => false, 'code' => 1002, 'msg' => '两次密码不一致', 'data' => []]);
        }

        if ($new_pwd == $ori_pwd) {
            $this->ajaxReturn(['status' => false, 'code' => 1005, 'msg' => '新密码不能跟原密码相同', 'data' => []]);
        }

        $user = $this->checkUser('store', $uid);
        if ($user) {
            if ($ori_pwd == $user['password']) {
                $rs = M('store')->where(['id' => $uid])->save(['password' => $new_pwd, 'update_time' => time()]);
                if ($rs !== false) {
                    $this->ajaxReturn(['status' => true, 'code' => 1000, 'msg' => '修改密码成功', 'data' => []]);
                } else {
                    $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '服务器异常', 'data' => []]);
                }
            } else {
                $this->ajaxReturn(['status' => false, 'code' => 1003, 'msg' => '原始密码错误', 'data' => []]);
            }
        } else {
            $this->ajaxReturn(['status' => false, 'code' => 1004, 'msg' => '用户信息错误', 'data' => []]);
        }
    }

    /**
     * 审核上下画
     * 1=>上画验收 2=>下画验收
     */
    public function auditWorkerRes()
    {
        $order_no = I('order_no');
        $user_id = I('user_id');
        $type = I('type');

        $r = M("order")->where(['order_no' => $order_no])->find();
        $user = M("store")->field("manager_name name,id")->where(['id' => $user_id])->find();
        if (!$r) {
            $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '订单号异常', 'data' => []]);
        }

        if ($user_id != $r['store_id']) {
            $this->ajaxReturn(['status' => false, 'code' => 1003, 'msg' => '非法请求，请联系管理员处理', 'data' => []]);
        }

        $now_status = $r['worker_order_status'];
        if ($type == 1) {
            if ($now_status != 4) {
                $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '当前无法完成验收', 'data' => []]);
            } else {
                //判断是否需要下画，如果没有直接结束流程
                if ($r['down_time'] > 0) {
                    //需要下画
                    orderWorkerLog($order_no, $now_status, $user, '上画验收完成', 'add');
                    $rr = M('order')->where(['order_no' => $order_no])->save(['worker_order_status' => 5, 'order_status' => 5, 'update_time' => time()]);
                } else {
                    //不需要下画
                    orderWorkerLog($order_no, $now_status, $user, '上画验收完成，已完成', 'add');
                    $rr = M('order')->where(['order_no' => $order_no])->save(['worker_order_status' => 8, 'order_status' => 7, 'update_time' => time()]);
                }

                $this->ajaxReturn(['status' => true, 'code' => 1000, 'msg' => '上画验收完成', 'data' => []]);
            }
        }

        if ($type == 2) {
            if ($now_status != 7) {
                $this->ajaxReturn(['status' => false, 'code' => 1001, 'msg' => '当前无法完成验收', 'data' => []]);
            } else {
                orderWorkerLog($order_no, $now_status, $user, '下画验收完成', 'add');
                $rr = M('order')->where(['order_no' => $order_no])->save(['worker_order_status' => 8, 'order_status' => 7, 'update_time' => time()]);

                $this->ajaxReturn(['status' => true, 'code' => 1000, 'msg' => '下画验收完成，已完成', 'data' => []]);
            }
        }
    }
}